package com.junzhiit.nengji.model.enums;

import com.bainaeco.framework.exception.InvalidArgumentException;

public enum ShopIsRecentChange {
	
	NO(0,"否"),
	YES(1,"是");
	
	private Integer status;
	
	private String value;

	private ShopIsRecentChange(Integer status,String value){
		this.status = status;
		this.value = value;
	}

	public int toIntStatus() {
		return this.status;
	}
	
	public String toStringValue() {
		return this.value;
	}

	public static ShopIsRecentChange toFlag(int status) {
		if (NO.status == status) {
			return NO;
		} else if (YES.status == status) {
			return YES;
		} else {
			throw new InvalidArgumentException("Unknown status[" + status + "].");
		}
	}
}
